Optimal. Leaf size=27 \[ -i x+2 i e^{i a} \tanh ^{-1}\left (e^{-i a} x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {4588, 381, 396,
213} \begin {gather*} 2 i e^{i a} \tanh ^{-1}\left (e^{-i a} x\right )-i x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 381
Rule 396
Rule 4588
Rubi steps
\begin {align*} \int \cot (a+i \log (x)) \, dx &=\int \cot (a+i \log (x)) \, dx\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 42, normalized size = 1.56 \begin {gather*} -i x+2 i \tanh ^{-1}(x \cos (a)-i x \sin (a)) \cos (a)-2 \tanh ^{-1}(x \cos (a)-i x \sin (a)) \sin (a) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 22, normalized size = 0.81
method | result | size |
risch | \(-i x +2 i \arctanh \left (x \,{\mathrm e}^{-i a}\right ) {\mathrm e}^{i a}\) | \(22\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 94 vs. \(2 (17) = 34\).
time = 0.28, size = 94, normalized size = 3.48 \begin {gather*} -{\left (\cos \left (a\right ) + i \, \sin \left (a\right )\right )} \arctan \left (\sin \left (a\right ), x + \cos \left (a\right )\right ) - {\left (\cos \left (a\right ) + i \, \sin \left (a\right )\right )} \arctan \left (\sin \left (a\right ), x - \cos \left (a\right )\right ) - \frac {1}{2} \, {\left (-i \, \cos \left (a\right ) + \sin \left (a\right )\right )} \log \left (x^{2} + 2 \, x \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (a\right )^{2}\right ) - \frac {1}{2} \, {\left (i \, \cos \left (a\right ) - \sin \left (a\right )\right )} \log \left (x^{2} - 2 \, x \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (a\right )^{2}\right ) - i \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 49 vs. \(2 (17) = 34\).
time = 3.21, size = 49, normalized size = 1.81 \begin {gather*} -\sqrt {-e^{\left (2 i \, a\right )}} \log \left (x + i \, \sqrt {-e^{\left (2 i \, a\right )}}\right ) + \sqrt {-e^{\left (2 i \, a\right )}} \log \left (x - i \, \sqrt {-e^{\left (2 i \, a\right )}}\right ) - i \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.10, size = 29, normalized size = 1.07 \begin {gather*} - i x - \left (i \log {\left (x - e^{i a} \right )} - i \log {\left (x + e^{i a} \right )}\right ) e^{i a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 38 vs. \(2 (17) = 34\).
time = 0.44, size = 38, normalized size = 1.41 \begin {gather*} i \, e^{\left (i \, a\right )} \log \left (i \, x + i \, e^{\left (i \, a\right )}\right ) - i \, e^{\left (i \, a\right )} \log \left (-i \, x + i \, e^{\left (i \, a\right )}\right ) - i \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.18, size = 29, normalized size = 1.07 \begin {gather*} -x\,1{}\mathrm {i}+\mathrm {atan}\left (\frac {x}{\sqrt {-{\mathrm {e}}^{a\,2{}\mathrm {i}}}}\right )\,\sqrt {-{\mathrm {e}}^{a\,2{}\mathrm {i}}}\,2{}\mathrm {i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________